package com.taotao.common.enums;

public enum OrderStatus {
	orderStatus_1("1","Unpaid"),
	orderStatus_2("2","In Service"),
	orderStatus_3("3","Finish"),
	orderStatus_4("4","In refund"),
	orderStatus_5("5","Already refund"),
	orderStatus_100("100","Delete");
	
	private String code;
	private String desc;
	
	public String getCode() {
		return code;
	}
 
	public void setCode(String code) {
		this.code = code;
	}
 
	public String getDesc() {
		return desc;
	}
 
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	OrderStatus(String code,String desc){ 
		this.code=code;
		this.desc=desc;
	}
	
	public static String getValue(String code){
		for (OrderStatus type : values()) {
			if(type.getCode().equals(code)){
				return type.getDesc();
			}
		}
		return null;
	}
}
